<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%@ page import="com.bulls.demo.hrmsdemo.vo.EmployeeVO,com.bulls.demo.hrmsdemo.db.Employee,com.bulls.demo.hrmsdemo.db.EmployeeQualification,com.bulls.demo.hrmsdemo.db.EmployeeExperience" %>
<%@taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Employee</title>
<%EmployeeVO employeeVO = new EmployeeVO();
  Employee employee = new Employee();
  EmployeeQualification employeeQualification = new EmployeeQualification();
  EmployeeExperience employeeExperience = new EmployeeExperience();
	employeeVO = (EmployeeVO)request.getSession().getAttribute("employeeVO");
	if(employeeVO!=null){
		System.out.println("employee");
		employee = employeeVO.getEmployee();
		System.out.println("employee"+employee);
	}
	%>
<script type="text/javascript">
  function showemployee(){
	 // alert("showemployee");
	  var retvalue = window.showModalDialog('list.do?cmd=EmployeeList', '_blank', 'toolbar=0,location=0,menubar=0,height=400,width=750,left=300,top=150');
	  setValue(retvalue);
  }
  function setValue(returnValue){
		var retValues = returnValue.split(",");
		document.getElementById("employeeid").value = retValues[0];
	}
</script>
</head>
<body>
<center>
	<html:form action="employee">
	<table><tr><td align="center"><h2>Employee</h2></td></tr></table>
	<table  align="left" width="100%">
	  <tr>
	    <td width="100% align="left">
	      <table>
	        <tr>
	          <td width="25%" align="left">Employee ID</td>
	          <td width="25%"  ><html:text property="employeeid" styleId="employeeid" value="<%=employee.getEmployeeid()!=null?employee.getEmployeeid().toString():null%>"></html:text><input type="button" onclick="showemployee()"/></td>
	          <td width="25%"  align="left">Employee Name</td>
	          <td width="25%"  ><html:text property="employeeName" styleId="employeeName" value="<%=employee.getEmployeeName()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Designation</td>
	          <td width="25%"  ><html:text property="designation" styleId="designation" value="<%=employee.getDesignation()%>"></html:text></td>
	          <td width="25%"  align="left">Department</td>
	          <td width="25%"  ><html:text property="department" styleId="department" value="<%=employee.getDepartment()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Email ID</td>
	          <td width="25%"  ><html:text property="emailid" styleId="emailid" value="<%=employee.getEmailid()%>"></html:text></td>
	          <td width="25%"  align="left">Mobile No</td>
	          <td width="25%"  ><html:text property="mobile" styleId="mobile" value="<%=employee.getMobile()%>"></html:text></td>
	        </tr>
	         <tr>
	          <td width="100%" align="left" colspan="4"><h3>Personal Information</h3></td>
	         </tr> 
	         <tr>
	          <td width="25%" align="left">Surname</td>
	          <td width="25%"  ><html:text property="lastName" styleId="lastName" value="<%=employee.getLastName()%>"></html:text></td>
	          <td width="25%"  align="left">Father/Husband Name</td>
	          <td width="25%"  ><html:text property="fatherOrHusbandName" styleId="fatherOrHusbandName" value="<%=employee.getFatherOrHusbandName()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Gender</td>
	          <td width="25%"  ><html:text property="gender" styleId="gender" value="<%=employee.getGender()%>"></html:text></td>
	          <td width="25%"  align="left">DOB</td>
	          <td width="25%"  ><html:text property="dateOfBirth" styleId="dateOfBirth" value="<%=employee.getDateOfBirth()!=null?employee.getDateOfBirth().toString():null%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Date of Joining</td>
	          <td width="25%"  ><html:text property="dateOfJoining" styleId="dateOfJoining" value="<%=employee.getDateOfJoining()!=null?employee.getDateOfJoining().toString():null%>"></html:text></td>
	          <td width="25%"  align="left">Nature Of Job</td>
	          <td width="25%"  ><html:text property="natureOfJob" styleId="natureOfJob" value="<%=employee.getNatureOfJob()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Pan Number</td>
	          <td width="25%"  ><html:text property="panNumber" styleId="panNumber" value="<%=employee.getPanNumber()%>"></html:text></td>
	          <td width="25%" align="left" >Project</td>
	          <td width="25%"  ><html:text property="project" styleId="project" value="<%=employee.getProject()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Reporting to</td>
	          <td width="25%"  ><html:text property="reportingto" styleId="reportingto" value="<%=employee.getReportingto()%>"></html:text></td>
	          <td width="25%" align="left" >Role</td>
	          <td width="25%"  ><html:text property="role" styleId="role" value="<%=employee.getRole()%>"></html:text></td>
	        </tr>
     
	         <tr>
	          <td width="100%" align="left" colspan="4"><h3>Contact Address</h3></td>
	         </tr> 
	        <tr>
	          <td width="25%" align="left">Address Line1</td>
	          <td width="25%"  ><html:text property="address1" styleId="address1" value="<%=employee.getAddress1()%>"></html:text></td>
	          <td width="25%"  align="left">Address Line2</td>
	          <td width="25%"  ><html:text property="address2" styleId="address2" value="<%=employee.getAddress2()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">Country</td>
	          <td width="25%"  ><html:text property="country" styleId="country" value="<%=employee.getCountry()%>"></html:text></td>
	          <td width="25%" align="left" >State</td>
	          <td width="25%"  ><html:text property="state" styleId="state" value="<%=employee.getState()%>"></html:text></td>
	        </tr>
	        <tr>
	          <td width="25%" align="left">City</td>
	          <td width="25%"  ><html:text property="city" styleId="city" value="<%=employee.getCity()%>"></html:text></td>
	          <td width="25%" align="left" >Zipcode</td>
	          <td width="25%"  ><html:text property="pincode" styleId="pincode" value="<%=employee.getPincode()!=null?employee.getPincode().toString():null%>"></html:text></td>
	        </tr>
    
	        <tr>
	          <td width="25%"  align="left">Landline No</td>
	          <td width="25%"  ><html:text property="telephoneNumber" styleId="telephoneNumber" value="<%=employee.getTelephoneNumber()%>"></html:text></td>
	          <td width="25%"  align="left"></td>
	          <td width="25%"  ></td> 
	        </tr>
	      </table>
	    </td>
	  </tr>
	</table>
	<table>
	<tr>
	<td align="center">
	<html:submit property="method" styleId="method" value="save"></html:submit>
	<html:submit property="method" styleId="method" value="search"></html:submit>
	<html:submit property="method" styleId="method" value="delete"></html:submit>
	</td>
	</tr>
	</table>
	
	</html:form>
</center>
</body>
</html>